package xyz.suancaiyu.chapter42.bean;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 4.3.3 自定义配置文件.
 *
 * @author puruidong
 * @version 2018/12/28 22:08
 */
@Configuration
@PropertySource(value = "classpath:test.properties")
@ConfigurationProperties(prefix = "xyz.suancaiyu")
@Data
@NoArgsConstructor
public class User {
    private String name;
    private int age;
}
